package com.ruoyi.cmecomon.controller;


import com.ruoyi.cmecomon.service.HomePageServiceImpl;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HomePageController {

    @Autowired
    private HomePageServiceImpl homePageService;

    //获取订单总量、交货量、完成率
    @GetMapping("/orderTotal")
    public AjaxResult getOrderToyal(){
       return homePageService.getOrders();
    }

    //获取本周单量统计数据
    @GetMapping("/weekOrder")
    public AjaxResult getWeekOrder(){ return homePageService.getWeekOrder(); };

    //获取质量统计数据
    @GetMapping("/productquality")
    public AjaxResult getProductquality(){return homePageService.getQroductquality();};

    //获取分类数据
    @GetMapping("/classificationStatistics")
    public AjaxResult getclassificationStatistics(){
        return homePageService.getclassificationStatistics();
    };


}
